#ifndef ELEMENT_H_INCLUDED
#define ELEMENT_H_INCLUDED

/*
**  This program is free software: you can redistribute it and/or modify
**  it under the terms of the GNU General Public License as published by
**  the Free Software Foundation, either version 3 of the License, or
**  (at your option) any later version.
**
**  This program is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**  GNU General Public License for more details.
**
**  You should have received a copy of the GNU General Public License
**
************  File Info  ********************************
**
**  Author: CMlr<zxyzxy12321@gmail.com>
**  Date:
**  Project: MyPowder
**  Description:
**
**
*/

#include "defines.h"

#define TYPE_NONE    0x0
#define TYPE_SOLID   0x1
#define TYPE_POWDER  0x2
#define TYPE_LIQUID  0x3
#define TYPE_GAS     0x4
#define TYPE_RASING  0x5



typedef int (*on_update_t)(int i);
typedef void (*on_draw_t)(int i);


/* element type */
struct element_t {
    const char* name;
    int id;
    color_t color;
    int life, lifedec;
    int gravity;
    int weight;
    int type;
    float temp;
    on_update_t on_update;
    on_draw_t on_draw;
    const char* desc;
};

typedef struct element_t element_t;


extern const element_t elem[PT_MAX];
extern pmap_t pmap[YRES][XRES];
extern part_t parts[MAX_PART_COUNT];

#endif // ELEMENT_H_INCLUDED
